package com.wingstudio.springcloud.service;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author ITcz
 * @Data 2021-04-15 - 21:35
 */
@Component
@FeignClient(name = "CLOUD-PAYMENT-SERVICE", fallback = OrderServiceFallback.class)
public interface OrderHystrixService {

    @GetMapping("/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/error/{id}")
    public String paymentInfo_ERROR(@PathVariable("id") Integer id);
}
